package common;

import java.net.Socket;

import model.command.CommandLogout;
import model.command.ConnectComand;
import model.command.SendFileCommand;

/**
 * 用于client请求的操作实现.
 *
 * @author guanweichen
 * @version Jan 18, 2011
 */
public abstract class ServerOperate {

	protected Socket client;
	protected Server server;

	/**
	 * 第一次连接服务器.
	 * 
	 * @param client
	 * @param command
	 */
	public abstract void connect(Socket client, ConnectComand comand);
	/**
	 * 发送文件内容.
	 * 
	 * @param client
	 * @param command
	 */
	public abstract void sendLogFile(Socket client, String fileName, SendFileCommand sendFileCommand);
	
	/**
	 * 发送共享文件列表.
	 * 
	 * @param client
	 */
	public abstract void sendListShareFile(Socket client);
	
	/**
	 * client leave.
	 * 
	 * @param client
	 * @param command
	 */
	public abstract void clientLogout(Socket client, CommandLogout command);
	
	/**
	 * send IP limit message to client.
	 * 
	 * @param client
	 * @param command
	 */
	public abstract void limitIpMessage(Socket client);
}
